#ifndef __DEV_BUZZER_H__
#define __DEV_BUZZER_H__
#include <stdint.h>
#include "gd32f4xx.h"

#define BEEP_0                            0
#define BEEP_1                            1
#define BEEP_2                            2
#define BEEP_3                            3
#define BEEP_4                            4

typedef struct bs_buz_dev {
    uint32_t         port;
    uint32_t         pin;
    uint32_t         state;
    uint32_t         cycle_count;

    int32_t          timer;
    int32_t          beep_time;
    int32_t          mute_time;
}bs_buz_dev_t;


void bs_dev_buz_init(void);
void bs_dev_buz_ctl(int cmd);
void bs_dev_buz_process(void);

#endif
